<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function getRandom(min,max){
        return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    var arr = [];
    for(var i = 0 ;i<10;i++){
        arr.push(getRandom(1,100));
        arr.sort(function(a,b){
            return b-a;
        })
    }
    var newarr = [];
    for(var i = 0 ;i<arr.length;i++){
        if(newarr.indexOf(arr[i])==-1){
            newarr.push(arr[i]);
        }
    }
    for(var i = 0;i<newarr.length;i++){
        document.write(newarr[i]+' ')
    }
</script>